{% extends 'base.html.twig' %}

{% block body %}
    <div class="container">
        <h1 class="fortune-header text-center">Query for your Fortune</h1>
    {% for category in categories %}
        <div class="row">
            <div class="col-sm-12 col-md-6 col-md-offset-3">
                <a class="btn btn-lg btn-margin btn-warning btn-block" href="{{ path('category_show', {'id': category.id}) }}">
                    <span class="fa {{ category.iconKey }}"></span> {{ category.name }}  ({{ category.fortuneCookies|length }})
                </a>
            </div>
        </div>
    {% else %}
        <div class="alert alert-warning"><h3>Rough day - no fortunes found :(</h3></div>
    {% endfor %}
    </div>
{% endblock %}
